// 1. 引入applyMiddleware
import { createStore, applyMiddleware } from 'redux';
// 2. 引入createSagaMiddleware
import createSagaMiddleware from 'redux-saga';
// 3. 引入rootSaga
import rootSaga from './rootSaga.js';

import combineReducer from './combineReducer';

const saga = createSagaMiddleware();

const store = createStore(combineReducer, applyMiddleware(saga));

saga.run(rootSaga);

export default store;
